import { createMemoryHistory, createRouter, createWebHashHistory } from 'vue-router'
import Index from "~/pages/index.vue"
import Login from "~/pages/login.vue"
import English from "~/pages/english.vue"
import Oral from "~/pages/oral.vue"
import NotFound from "~/pages/404.vue"

// 路由数组
const routes = [
    {
        path: "/",
        component: Index
    },
    {
        path: "/login",
        component: Login
    },
    {
        path: "/english",
        component: English
    },
    {
        path: "/oral",
        component: Oral
    },
    {
        path: '/:pathMatch(.*)*', 
        name: 'NotFound', 
        component: NotFound 
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router;